(function(){
    var $ = function(id){return document.getElementById(id)},
    sendBtn,txtMsg;
    switch(location.hostname){
        case "t.qq.com":
            sendBtn = document.getElementsByClassName("sendBtn")[0];
            txtMsg = $("msgTxt");
            break;
        case "t.sina.com.cn":
            sendBtn = $("publisher_submit");
            txtMsg = $("publish_editor");
            break;
        case "t.sohu.com":
            sendBtn = document.getElementsByClassName("crJs_submit")[0];
            txtMsg = document.getElementsByClassName("atfake");
            txtMsg = txtMsg.length > 0 && txtMsg.nextElementSibling;
            break;
    }    
    
    if(!(sendBtn || txtMsg)){return;}

    sendBtn.title = "咆哮吧！！！！！";
    sendBtn.addEventListener("mousedown", function(){
        if(txtMsg.value.trim().length > 0) {
            txtMsg.value = paoxiao(txtMsg.value);
        }
    }, false);
})();
